<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>ES Module测试</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport" user-scalable="no">
    <script defer type="module" src="src/index.js"></script>
</head>
<body>
<p>动态引入</p>
<button id="btn1">load1</button>
<script>
    document.getElementById('btn1').addEventListener("click", async () => {
        const {add} = await import("./src/add.js")
        const res = add(1, 2)
        document.write(res)
    })
</script>
</body>
</html>
